package com.esri.core.map;

import com.esri.core.internal.util.d;
import com.esri.core.map.DataSource;
import java.io.StringWriter;
import org.codehaus.jackson.JsonGenerator;

/* loaded from: classes.dex */
public class JoinTableDataSource extends DataSource {
    private LayerSource a;
    private LayerSource b;
    private String c;
    private String d;
    private JoinType e;

    /* loaded from: classes.dex */
    public enum JoinType {
        LeftOuter("esriLeftOuterJoin"),
        LeftInner("esriLeftInnerJoin");
        
        private String a;

        JoinType(String str) {
            this.a = str;
        }

        public String getValue() {
            return this.a;
        }
    }

    public JoinTableDataSource() {
        setType(DataSource.DataSourceType.joinTable);
    }

    public LayerSource getLeftTableSource() {
        return this.a;
    }

    public void setLeftTableSource(LayerSource layerSource) {
        this.a = layerSource;
    }

    public LayerSource getRightTableSource() {
        return this.b;
    }

    public void setRightTableSource(LayerSource layerSource) {
        this.b = layerSource;
    }

    public String getLeftTableKey() {
        return this.c;
    }

    public void setLeftTableKey(String str) {
        this.c = str;
    }

    public String getRightTableKey() {
        return this.d;
    }

    public void setRightTableKey(String str) {
        this.d = str;
    }

    public JoinType getJoinType() {
        return this.e;
    }

    public void setJoinType(JoinType joinType) {
        this.e = joinType;
    }

    @Override // com.esri.core.map.DataSource
    public String toJson() throws Exception {
        StringWriter stringWriter = new StringWriter();
        JsonGenerator a = d.a(stringWriter);
        a.writeStartObject();
        a.writeFieldName("type");
        a.writeString(getType().toString());
        a.writeFieldName("leftTableSource");
        a.writeRawValue(this.a.toJson());
        a.writeFieldName("rightTableSource");
        a.writeRawValue(this.b.toJson());
        a.writeStringField("leftTableKey", this.c);
        a.writeStringField("rightTableKey", this.d);
        a.writeStringField("joinType", this.e.getValue());
        a.writeEndObject();
        a.close();
        return stringWriter.toString();
    }

    @Override // com.esri.core.map.DataSource
    public String toString() {
        return "JoinTableDataSource [" + super.toString() + ",leftTableSource=" + this.a + ", rightTableSource=" + this.b + ", leftTableKey=" + this.c + ", rightTableKey=" + this.d + ", joinType=" + this.e + "]";
    }
}
